<?php 
namespace Home\Model;
use Think\Model;
class QiugouModel extends Model{
	protected $trueTableName='qiugou';
		public function qiugou($kind,$desc,$price,$area,$detail,$contract,$user){
      if(empty($kind)||empty($desc)||empty($price)||empty($area)||empty($detail)||empty($contract)||empty($user)){
      	return 0;
      	//数据不全
      }else{
             $data['kind']=$kind;
             $data['desc']=$desc;
             $data['price']=$price;
             $data['area']=$area;
             $data['detail']=$detail;
             $data['contract']=$contract;
             $data['user']=$user;
             $data['createtime']=time();
             $res=$this->add($data);
            if($res){
             //添加成功
                  return 1;
            }else{
                  return 0;
            }
      }
	}
}

 ?>